package io.wongd.lib_douyin.util

import android.annotation.SuppressLint
import android.content.Context
import android.widget.Toast

@SuppressLint("StaticFieldLeak")
object T {

    private var sContext: Context? = null

    fun init(context: Context?) {
        sContext = context
    }

    @JvmStatic
    fun show(msg: CharSequence?) {
        sContext ?: return
        msg ?: return
        try {
            Toast.makeText(sContext, msg, Toast.LENGTH_SHORT).show()
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }
}